package com.monitorRoutine.monitorRoutineServer.util;

import java.time.Instant;
import java.time.ZoneId;
import java.time.ZonedDateTime;
import java.time.format.DateTimeFormatter;

public class TimeUtil {
    // 辅助方法，将Instant转换为ZonedDateTime并格式化
    public static String formatInstant(Instant instant, DateTimeFormatter formatter) {
        ZonedDateTime zonedDateTime = instant.atZone(ZoneId.systemDefault());
        return formatter.format(zonedDateTime);
    }
}
